<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div {
        width: 500px;
        height: 400px;
        border: 1px solid #000;
        margin: 50px auto;
        position: relative;
        background-color: #fff;
      }
      span {
        position: absolute;
        width: 200px;
        height: 200px;
        background-color: aqua;
        top: 50px;
        left: 50px;
        /* z-index: 3; */
      }
      aside {
        position: absolute;
        width: 250px;
        height: 250px;
        background-color: lightcoral;
        bottom: 50px;
        right: 50px;
        z-index: -7;
      }
    </style>
  </head>
  <body>
    <div>
      <span></span>
      <aside></aside>
    </div>
  </body>
</html>

<!-- 
  定位层级
    z-index: 整数

    z-index属性是不带单位的，并且可以给负值，没有设置z-index时，最后写的对象优先显示在上层，设置后，数值越大，层越靠上；
 -->
